diff options
| author | Adam Soltys <[email protected]> | 2023-12-15 15:24:43 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-15 15:24:43 -0800 |
| commit | 7d598265e60eecf06a27501a85e8db330aeed381 (patch) | |
| tree | 80c73666f5ba3c5f852ac961dd0cf01e551c7896 /src/routes/(app)/fund/[id]/sweep | |
| parent | 310687af30375e87679ea5a9ff3fef5a8f4f12fa (diff) | |
| download | coinos-ui-7d598265e60eecf06a27501a85e8db330aeed381.tar.gz coinos-ui-7d598265e60eecf06a27501a85e8db330aeed381.zip | |
sveltekit 2
Diffstat (limited to 'src/routes/(app)/fund/[id]/sweep')
| -rw-r--r-- | src/routes/(app)/fund/[id]/sweep/+page.server.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/(app)/fund/[id]/sweep/+page.server.js b/src/routes/(app)/fund/[id]/sweep/+page.server.js index 05fb18b6..613cf8e2 100644 --- a/src/routes/(app)/fund/[id]/sweep/+page.server.js +++ b/src/routes/(app)/fund/[id]/sweep/+page.server.js @@ -6,8 +6,8 @@ export async function load({ cookies, params, parent }) { let { id } = params; let { amount } = await get(`/fund/${id}`); - if (!amount) throw redirect(307, `/fund/${id}`); - if (!user) throw redirect(307, `/register?redirect=/fund/${id}/sweep`); + if (!amount) redirect(307, `/fund/${id}`); + if (!user) redirect(307, `/register?redirect=/fund/${id}/sweep`); await post("/take", { amount, id }, auth(cookies)); return { amount, id }; } |
